package com.xidian.zhiancloud.service.checkdanger;

import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.xidian.zhiancloud.dao.checkdanger.ChkRecordMapper;
import com.xidian.zhiancloud.qo.BaseReqQuery;

@Service
public class ChkRecordService {

	@Autowired
	ChkRecordMapper chkrdMapper;
	
	public Page<Map<String,String>> getChkRecordList(BaseReqQuery reqdata,String key)
	{
		PageHelper.startPage(reqdata.getPageNum(), reqdata.getPageSize());
		Page<Map<String,String>> pagedata =chkrdMapper.getChkRecordList(key);
		return pagedata;
	}
	public int insertChkRecord(Map<String,Object> params)
	{
		return chkrdMapper.insertChkRecord(params);
	}
	
	public int updateChkRecord(Map<String,Object> params)
	{
		return chkrdMapper.updateChkRecord(params);
	}
	
	// 隐患核查列表
	public Page<Map<String,String>> getChkCheckList(BaseReqQuery reqdata,String key)
	{
		PageHelper.startPage(reqdata.getPageNum(), reqdata.getPageSize());
		Page<Map<String,String>> pagedata =chkrdMapper.getChkCheckList(key);
		return pagedata;
	}
	
	public int insertChkCheck(Map<String,Object> params)
	{
		return chkrdMapper.insertChkCheck(params);
	}
	
	public int updateChkCheck(Map<String,Object> params)
	{
		return chkrdMapper.updateChkCheck(params);
	}
	
		// 隐患整改列表 
	public Page<Map<String,String>> getChkModifyList(BaseReqQuery reqdata,String key)
	{
		PageHelper.startPage(reqdata.getPageNum(), reqdata.getPageSize());
		Page<Map<String,String>> pagedata =chkrdMapper.getChkModifyList(key);
		return pagedata;
	}
	
	public int insertChkModify(Map<String,Object> params)
	{
		return chkrdMapper.insertChkModify(params);
	}
	
	public int updateChkModify(Map<String,Object> params)
	{
		return chkrdMapper.updateChkModify(params);
	}
	
		// 隐患验收列表
	public Page<Map<String,String>> getChkAcceptList(BaseReqQuery reqdata,String key)
	{
		PageHelper.startPage(reqdata.getPageNum(), reqdata.getPageSize());
		Page<Map<String,String>> pagedata =chkrdMapper.getChkAcceptList(key);
		return pagedata;
	}
	
	public int insertChkAccept(Map<String,Object> params)
	{
		return chkrdMapper.insertChkAccept(params);
	}
	
	public int updateChkAccept(Map<String,Object> params)
	{
		return chkrdMapper.updateChkAccept(params);
	}
	
	public Map<String,String> getRDDeail1 (String rdid)
	{
		return chkrdMapper.getRDDeail1(rdid);
	}
	public Map<String,String> getRDCheck2 (String rdid)
	{
		return chkrdMapper.getRDCheck2(rdid);
	}
	public Map<String,String> getRDModify3 (String rdid)
	{
		return chkrdMapper.getRDModify3(rdid);
	}
	public Map<String,String> getRDAccept4 (String rdid)
	{
		return chkrdMapper.getRDAccept4(rdid);
	}
}
